#ifndef __SPI_H
#define __SPI_H
#include "sys.h" 

/************ 0-1 = R **************/
/************ 2-6 = RW **************/

#define Fault_Status   0x00 << 11
#define VGS_Status     0x01 << 11
#define Driver_Control 0x02 << 11
#define Gate_Drive_HS  0x03 << 11
#define Gate_Drive_LS  0x04 << 11
#define OCP_Control    0x05 << 11
#define CSA_Control    0x06 << 11

void SPI1_Init(void);
void SPI3_Init(void);
u16 SPI1_ReadWriteByte(u16 SPI1_Data);
u8 SPI3_ReadWriteByte(u8 TxData);
u16 Read_MA732(void);
u16 Read_DRV8323(u16 address);
u16 Write_DRV8323(u16 address,u16 DRV_Data);

#endif
